/*
 *  Copyright (c) 2006-2007 Tiark Rompf, Nachtlicht-Media
 *  
 *  All rights reserved. This software is copyrighted work licensed under
 *  the terms of the MIT License.  Please consult the file "LICENSE" for
 *  details. There is NO warranty.
 *  
 *  $Id:$
 */

import java.io.*;

public class VodkaUtil
{
	// util
	
//	public static String strcat(TupleValue x)
//	public static void print(Object x)
//	public static int milliTime)
	
	
	// arithmetic
	
	public static String	plus(String a, Object b)	{ return a + b; }
	
	public static int		plus(int a, int b)			{ return a + b; }
	public static long		plus(long a, long b)		{ return a + b; }
	public static float		plus(float a, float b)		{ return a + b; }
	public static double	plus(double a, double b)	{ return a + b; }

	public static int		minus(int a, int b)			{ return a - b; }
	public static long		minus(long a, long b)		{ return a - b; }
	public static float		minus(float a, float b)		{ return a - b; }
	public static double	minus(double a, double b)	{ return a - b; }

	public static int		minus(int a)				{ return -a; }
	public static long		minus(long a)				{ return -a; }
	public static float		minus(float a)				{ return -a; }
	public static double	minus(double a)				{ return -a; }

	public static int		times(int a, int b)			{ return a * b; }
	public static long		times(long a, long b)		{ return a * b; }
	public static float		times(float a, float b)		{ return a * b; }
	public static double	times(double a, double b)	{ return a * b; }

	public static int		div(int a, int b)			{ return a / b; }
	public static long		div(long a, long b)			{ return a / b; }
	public static float		div(float a, float b)		{ return a / b; }
	public static double	div(double a, double b)		{ return a / b; }

	public static int		mod(int a, int b)			{ return a % b; }
	public static long		mod(long a, long b)			{ return a % b; }
	public static float		mod(float a, float b)		{ return a % b; }
	public static double	mod(double a, double b)		{ return a % b; }

/*
	public static int		pow(int a, int b)			{ return a ** b; }
	public static long		pow(long a, long b)			{ return a ** b; }
	public static float		pow(float a, float b)		{ return a ** b; }
	public static double	pow(double a, double b)		{ return a ** b; }
*/

	// bit manipulation
	
	public static int		bitAnd(int a, int b)		{ return a & b; }
	public static long		bitAnd(long a, long b)		{ return a & b; }
	public static int		bitOr(int a, int b)			{ return a | b; }
	public static long		bitOr(long a, long b)		{ return a | b; }
	public static int		bitXor(int a, int b)		{ return a ^ b; }
	public static long		bitXor(long a, long b)		{ return a ^ b; }
	public static int		bitNot(int a)				{ return ~a; }
	public static long		bitNot(long a)				{ return ~a; }
	
	public static int		bitShiftLeft(int a, int b)				{ return a << b; }
	public static long		bitShiftLeft(long a, int b)				{ return a << b; }
	public static int		bitShiftRight(int a, int b)				{ return a >> b; }
	public static long		bitShiftRight(long a, int b)			{ return a >> b; }
	public static int		bitShiftRightUnsigned(int a, int b)		{ return a >>> b; }
	public static long		bitShiftRightUnsigned(long a, int b)	{ return a >>> b; }


	
	// comp

	public static boolean	lt(int a, int b)			{ return a < b; }
	public static boolean	lt(long a, long b)			{ return a < b; }
	public static boolean	lt(float a, float b)		{ return a < b; }
	public static boolean	lt(double a, double b)		{ return a < b; }

	public static boolean	gt(int a, int b)			{ return a > b; }
	public static boolean	gt(long a, long b)			{ return a > b; }
	public static boolean	gt(float a, float b)		{ return a > b; }
	public static boolean	gt(double a, double b)		{ return a > b; }

	public static boolean	le(int a, int b)			{ return a <= b; }
	public static boolean	le(long a, long b)			{ return a <= b; }
	public static boolean	le(float a, float b)		{ return a <= b; }
	public static boolean	le(double a, double b)		{ return a <= b; }

	public static boolean	ge(int a, int b)			{ return a >= b; }
	public static boolean	ge(long a, long b)			{ return a >= b; }
	public static boolean	ge(float a, float b)		{ return a >= b; }
	public static boolean	ge(double a, double b)		{ return a >= b; }

	public static boolean	eq(int a, int b)			{ return a == b; }
	public static boolean	eq(long a, long b)			{ return a == b; }
	public static boolean	eq(float a, float b)		{ return a == b; }
	public static boolean	eq(double a, double b)		{ return a == b; }

	public static boolean	eq(Object a, Object b)		{ return a.equals(b); }

	public static boolean	ne(int a, int b)			{ return a != b; }
	public static boolean	ne(long a, long b)			{ return a != b; }
	public static boolean	ne(float a, float b)		{ return a != b; }
	public static boolean	ne(double a, double b)		{ return a != b; }

	public static boolean	ne(Object a, Object b)		{ return !a.equals(b); }


	// logic

	public static boolean	and(boolean a, boolean b)	{ return a && b; }
	public static boolean	or(boolean a, boolean b)	{ return a || b; }
	public static boolean	not(boolean a)				{ return !a; }
}